package com.zzyl.common.utils;

public class UserIdThreadLocal {
    private static ThreadLocal<Integer> USER_THREAD_LOCAL = new ThreadLocal<>();


    public static void set(Integer userId){
        USER_THREAD_LOCAL.set(userId);
    }
    
    public static Integer getUserId(){
        return USER_THREAD_LOCAL.get();
    }
    
    public static void clear( ){
        USER_THREAD_LOCAL.remove();
    }
}